package com.liuze.websocketdemo.controller;

import com.liuze.websocketdemo.webSocketServer.WebSocketServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName SocketController
 * @Author 刘泽
 * @Mail liuze713@hotmail.com
 * @Date 2022/3/14 4:44 PM
 * @Version 1.0
 */
@RestController
@RequestMapping("socket")
public class SocketController {

    @Autowired
    private WebSocketServer webSocket;

    @GetMapping("findUserNames")
    public Object findUserNames() {
        return WebSocketServer.getWebSocketMapS();
    }
}
